<?php
namespace Api\Controller;

use Think\Controller;
use Base\FrontController;

/**
 * @name 前端造型所属分类相关功能提交异步数据到数据库 ，访问本接口下任何方法均要求session中已保留注册用户信息
 * swagger-ui api文档生成cmd： php D:\work\php\swagger-php\vendor\zircote\swagger-php\bin\swagger D:\work\php\wx-third-platform\code\Application\Api\Controller\swagger D:\work\php\wx-third-platform\code\Application\Api\Controller\BHLabelController.class.php  -o D:\work\php\wx-third-platform\code\swui\造型分类-label.json
 * @author perry
 *
 */
class BHLabelController extends FrontController
{

    // private $weixin_user;

    function _initialize()
    {
        parent::_initialize();
        
        $this->typeM=D('Home/BHLabel');
        $this->uid=$this->weixin_user['id'];
    }

     /**
     * @SWG\Get(
     *     path="/BHLabel/getAll",
     *     tags={"BHLabel-getAll"},
     *     description="获得所有已启用的衣橱和商品分类数据",
     *     operationId="BHLabel-getAll",
     *     produces={"application/json", "application/xml", "text/xml", "text/html"},
     *     @SWG\Response(
     *         response=200,
     *         description="所有已启用的衣橱和上皮分类数据",
     *         @SWG\Schema(
     *             ref="#/definitions/bhlabels"
     *         ),
     *     ),
     *     @SWG\Response(
     *         response="default",
     *         description="接口调用出错",
     *         @SWG\Schema(
     *             ref="#/definitions/ErrorModel"
     *         )
     *     )
     * )
     */
    public function getAll(){
        $re=$this->typeM->getAllEnabled();
        // dump($re);
        $this->customReturn(1,$re);
        
    }
  

}
